--------------------------------------------------- ----------------------------------------------- ------------------------------------------- --------------------------------------- ----------------------------------- ------------------------------- --------------------------- ----------------------- ------------------- --------------- SUPER Sparkle (tm) and by Rob W. Smetana Menu Magic (tm) and Pro~Formance --------------- ------------------- ----------------------- --------------------------- ------------------------------- ----------------------------------- --------------------------------------- ------------------------------------------- ----------------------------------------------- --------------------------------------------------- Super Sparkle (tm) & Menu Magic (tm) ** Version 4.3 (2/98) ** ================================================================== Note: With version 4.x, we introduced SUPER SPARKLE -- a combination of the original Sparkle and Sparkle_2. We also added several NEW features (See What's New). ================================================================== ================================================================== Copyright (C) 1990-1998, Rob W. Smetana All Rights Reserved 132 Alpine Terrace San Francisco, CA 94117 (415) 863-0530 Sparkle, Super Sparkle, Menu Magic, Pro~Formance, P~F, and P-Screen are Trademarks of Rob W. Smetana ================================================================== ================================================================== Contents ================================================================== Introduction ...................................... a A Summary of Super Sparkle's Main Options ......... c What's New ........................................ d Warranty and Disclaimer ........................... e Limited License ................................... f Registering INSTANTLY! ............................ g Distributing Sparkle .............................. h MENU MAGIC ........................................ MM.1 Using MM ........................................ MM.2 Creating ".Com" Screens or "Drawing" Menu Screens; Entering File Names .......................... MM.4 Choosing Colors ................................. MM.6 More Options .................................... MM.8 SUPER SPARKLE ..................................... SS.1 Debugging Batch Files; Sparkle's Error Codes .... SS.3 Changing the "Text Marker" -- Setting SPM=? ..... SS.4 Sound Effects ................................... SS.5 Scrolling Bar Menus ............................. SS.6 Ask (a 3rd menu option, or just to pause) ....... SS.9 Big! Font ....................................... SS.10 Quick Print ..................................... SS.11 Windows ......................................... SS.12 Pause ........................................... SS.13 Monitor ......................................... SS.14 Paint ........................................... SS.16 Reverse Paint (Reverse Screen Colors) ........... SS.17 Notes on Paint and Reverse Paint .............. SS.18 Bright Background Colors ........................ SS.19 Get Input ....................................... SS.20 Using "Named Parameters" ...................... SS.33 Get DOS Version ................................. SS.23 Viewing Files ................................... SS.24 Dynamic Prompts ................................. SS.25 Dark Blue Background Colors ..................... SS.26 BIG! SCROLLING Messages ......................... SS.27 Fades (Dramatic Screen Transitions) ............. SS.28 Broadway Screen Font (VGAs only) ................ SS.29 Appendix I: A Note on Testing Errorlevels ....... A.1 Appendix II: Choosing COLOR Numbers .............. A.2 Appendix III: ASCII Codes for Keyboard Characters . A.3 Registering, Ordering ................... Last 2 Pages ================================================================== Introduction a ================================================================== Super Sparkle (SS) and Menu Magic (MM) are designed to BOTH add a little sparkle to your batch files (and to your day), AND to write your batch files for you! * Super Sparkle offers m-a-n-y options to add sparkle, con- venience and hard-to-achieve options to batch files: menus (3 options, including "scrolling bar menus" with mouse support); sound effects; tall, scrolling messages; colors (384 of them, including "bright background" and "dark blue" colors); windows; file viewing; dramatic screen transitions; and more. Run Demo.Bat to see most of Super Sparkle's options in action. * Menu Magic (MM) is a fill-in-the-blanks menu designer. Just type in your menu options, and MM will WRITE YOUR BATCH FILES FOR YOU -- complete with colorful, scrolling bar menus (with mouse support)! PLEASE START BY . . . We urge you to START by running DEMO.BAT -- the demo batch file. It demonstrates most of Sparkle's features. Once you "see" these features in action, the discussion of each option below might make more sense. NOTE THAT Demo.Bat requires several files that come with Sparkle. It relies heavily on these files (especially examples of "executable .COM screens") and therefore can't run unless all required files are on the current drive/directory. Included are: SS.Exe Super Sparkle's main program MM.Exe Menu Magic's main program SS.Txt This brief manual *.Bat Demo batch files (run DEMO!!) *.Com Examples of \ created using "executable ) P-SCREEN, our .COM screens" / screen-designer REGISTER.Exe To instantly convert Shareware versions into fully registered versions. Run: Demo.Bat For a demo of all current options. Purpose: Sparkle adds a little sparkle to your day or your batch files. Menu Magic will even create your scrol- ling bar menus and write your batch files for you! For help: For help, run Super Sparkle like this: ss . ================================================================== SUPER Sparkle -- The Latest in the Sparkle Series b ================================================================== With version 4.x, we introduced SUPER Sparkle. What's the dif- ference between Sparkle and SUPER Sparkle? * Early versions of Sparkle consisted of just Sparkle.Exe. When we decided to add options, we created Sparkle_2.Exe. * SUPER Sparkle COMBINES Sparkle and Sparkle_2 -- to make Sparkle easier for you to use. Super Sparkle also ADDS more options! As we developed early versions of Sparkle, we tried to keep .EXE sizes as small as possible -- so your batch files would run as quickly as possible. When we added options, instead of adding them to the original Sparkle.Exe, we left it as-is (to keep it small), and created Sparkle_2.Exe -- ie., we created the Sparkle "series." But as computers (and hard disks) got faster, it became less essential to keep .EXE sizes so small. And by combining Sparkle.Exe and Sparkle_2.Exe into ONE file, we've made it easier for you -- you have to manage just one .EXE file. This gives you safety and convenience, and makes Sparkle easier to use. ================================================================== Here is A Summary of SUPER Sparkle's MANY Options. c ================================================================== * SCROLLING BAR MENUS -- WITH MOUSE SUPPORT Turn ANY text-mode screen into a vertical -or- horizontal SCROLLING BAR menu! Menu Magic can even create your scrolling bar menu screens for you! * ASK Turn ANY screen (text -or- graphics) into a menu, or use Ask just to pause. You may print a prompt on any row or column, in any color. And you specify which keys are "valid." * BIG! FONT Print 8-line-high messages, in any color! BIG! SCROLL Display TALL, SCROLLING messages, in any color, using either the "normal" font or a custom "Broadway" font. * WINDOWS 250+ frame styles; with/without shadows, in any color. FILL Fill areas of the screen with any character in any color. * QUICK PRINT Print text anywhere on the screen, in any color. * SOUND EFFECTS Over 35 sound effects, from simple to elaborate. * PAUSE Pause from 1/3 second to as long as you want. * MONITOR Determine what type of display adapter/monitor is active. * PAINT Paint areas of the screen, in any color you choose. * REVERSE COLORS Reverse colors areas of the screen. Repeat this effect as many times as you like to call attention to areas. * BRIGHT BACKGROUNDS Enable or disable bright backgrounds (on EGA or VGA monitors). Use alone, or with Paint and/or Reverse. * DARKBLUE On VGA monitors, turn on "dark blue" background colors. * GET INPUT Get input from the user, from 1 - 80 characters. Sparkle will pass this back to you EITHER in an environment variable, or by writing it to a file. You control: where on the screen to get input, which colors to use, and both the maximum AND minimum number of characters to accept. * PROMPT Prompt users for a keypress with attention-getting: Twirling Batons, Exploding Buttons or a Scrolling Banner. * VIEW FILE View ASCII text files of ANY size: inside any-size window on your screen, and in any color you like. * DOS VERSION Determine which version of DOS is being used. * FADES Select from many, dynamic screen fades (screen transitions). * BROADWAY Screen Font On VGA screens, select a tall broadway text- mode screen font. Display both normal & Broadway at the same time! ================================================================== WHAT'S NEW d ================================================================== This summarizes improvements to and changes in Sparkle. If you have an earlier version of Sparkle, pay close attention to this. NOTE especially the changes to the Scrolling Bar menu option. Version Date What's New ------- ---- ------------------------------------------------ 4.3 2/98 Fine tuning; Changed .DOC to .TXT to avoid confusion. 4.2 9/97 Fixed bug in Register.Exe (thanks Rick P.). 4.0-4.1 8/95 COMBINED Sparkle and Sparkle2 into SUPER SPARKLE. Then we ADDED more options: Fades, Dark Blue Backgrounds, Big! Scroll and a VGA Broadway font. And Sparkle's "Window" option now lets you FILL areas of the screen with any ASCII character. We ALSO added options to: 1. Help you DEBUG batch files (we'll display errorlevels for you); and, 2. Let you CHANGE the "text marker" -- the character you use on the command line to mark the beginning of text. The "text marker" is normally "/". But if you need to use "/" in messages, just "SET SPM=?" to change the text marker to anything you like. MENU MAGIC: 1. No longer displays a fixed prompt at the bottom of .COM menu screens (we now give YOU the option to print what YOU want); and, 2. No longer raws menu screens by "pad- ding" menu options with ASCII 176 (we now use spaces -- as with .COM menu screens). 3.4-3.5 '94 Refinements, speed-up, fixed mouse slow-down. 3.1 9/92 Added an EXPLODING window option (option -6). 3.0 11/91 Added Menu Magic to create batch files and menu screens. 2.9/2.9c 10/91 Restored color parameter in SCROLLING BAR menus. 6/91 You can now repeat sound effects (suggested by Mark Dodd of Texas); tamed the "shareware re- minder" (thanks to V. Baxter of California). 2.8 5/91 Added mouse support to Scrolling Bar Menus. Eliminated "color" parameter in Bar menus. 2.7 11/90 Added "Phone" sound, "Pause" and "Monitor options. 2.4-2.6 9/90 Added 250+ frame styles to the "Window" option. Fixed bug: ASK didn't return 27 if Esc pressed. 2.3 6/90 1st public release. ================================================================== WARRANTY & DISCLAIMER e ================================================================== This product is provided "AS IS" without warranty of any kind. The entire risk as to the results and performance of this pro- duct is assumed by you. We warrant only that any disks we sent you are free from physical and workmanship defects under normal use and service for a period of 90 days from the date shipped. Our entire liability, and your exclusive remedy, as to the disk, shall be, at our option, to either (1) return the purchase price; or, (2) replace disks which don't meet our limited warranty. Since you can try "user supported" versions of our programs before ordering them, we offer no other warranty beyond that stated here. We'll gladly replace defective disks; but no refunds or credits can be issued. Neither Pro~Formance nor RWS & Associates nor Rob W. Smetana, nor any of their officers or employees shall be held responsible for: failures of this product to satisfy any needs, damages due to using this product, or any effects this program has on you, your business or operations. This product, its manual and any supporting materials may be modified or changed from time to time. They may contain opera- tional inaccuracies or typographical errors which may be cor- rected by future versions, if any. Registered users may be notified of available updates. ================================================================== LIMITED LICENSE f ================================================================== *** See the next page for details on registering INSTANTLY. *** Sparkle is NOT public domain or free software. It is "user- supported" software. Unauthorized copying or distribution of registered versions of this program is strictly forbidden. See the next page for details on REGISTERING INSTANTLY. UNREGISTERED users of this software are granted a limited license to "try out" the user-supported version, on a private, non- commercial basis, for the express purpose of determining whether it suits your needs. At the end of this trial period, you must either register your copy or stop using it. * Running Sparkle 15 - 20 different times should allow you to decide if it's going to be useful to you. Therefore the "trial period" is set at 30 days. REGISTERED users may make copies of SS.Exe and MM.Exe for archival, backup purposes only, and NOT for distribution. SINGLE-USER versions of Sparkle and Menu Magic are licensed like a book. That means you may use them at home, at work, or on your laptop -- on as many PCs as you like -- provided they are NEVER used on more than one PC at the same time. MULTI-USER/DEVELOPER versions of Sparkle are available. These versions may be used in offices (e.g., to create menuing systems many users might take advantage of), on distribution disks (e.g., software vendors create menus for catalogs), etc. The cost? 1-Time Fee ========== Up to 20 users: $ 69 Unlimited # of users: $169 ================================================================== WARNING: You MAY NOT use this program in any organization or in the conduct of any business activity without a prior purchase or license arrangement. Each copy used must be licensed -- either by an individual license, or via a site license or quantity discount agreement. Sparkle MAY NOT be distributed in any way without a prior, written license arrangement. A single-user license does NOT grant the right to give or make it available to others in any form, including its use on networked PCs. ================================================================== ================================================================== Registering INSTANTLY f ================================================================== You can register for Sparkle in two ways: 1. By mail (use the registration form at the end of this manual); or, 2. INSTANTLY by phone (with a Visa or MasterCard number). Regardless of how you register, we'll send you latest, registered version of Sparkle. Shareware versions of Sparkle include REGISTER.Exe. Run Register to convert shareware versions into fully registered versions. SHAREWARE VERSIONS OF Sparkle and Menu Magic ARE FULLY FUNCTIONING! They have ALL the features of registered versions, with NO limita- tions. However, shareware versions will periodically remind you to register by displaying something like this message: Reminder: This is an unregistered version. Run Register.Exe This reminder disappears when you run REGISTER (or receive a registered version from us). Early versions of Sparkle had NO built-in reminder, and TWO people registered! Enjoy Sparkle, but remember it is "user-supported." To register INSTANTLY using REGISTER.Exe . . . ============================================== Step 1: Be sure that SS.Exe, MM.Exe and REGISTER.Exe are on the drive/directory you're logged onto (SS.Exe and MM.Exe MUST be). Step 2: You'll call us twice at (415) 863 - 0530. * The first time you call, give us your name, address and Visa or MasterCard number. * We'll verify the credit card information and add your name to our database so we can notify you about updates. Step 3: BEFORE you call us the 2nd time: * Be sure SS.Exe is on the current drive/directory. Now run REGISTER.Exe. REGISTER will ask for the name of the program you want to register. Type in "ss" (without the quotation marks and without .EXE). * REGISTER will then print a number. CALL US when that number is on your screen, tell us what the number is, and we'll give you a DIFFERENT number to type in. * REGISTER will then ask you to enter your name. Type in your name and you'll have a fully-registered version. ================================================================== DISTRIBUTING Sparkle h ================================================================== Bulletin board Sysops, clubs and shareware distributors may dis- tribute SHAREWARE ("user supported") versions of Sparkle, provided: *** Your company name IS NOT: California Freeware *** American Freeware US Freeware or any company which uses terms like "freeware", "free" or "free software" to misrepresent "user-supported" software. (1) It is distributed in completely unmodified form, and you include all these files intact: SS.Exe, SS.Txt, Demo.Bat, MM.Exe, *.Com, and related files. (2) You charge nothing other than a "disk distribution fee" of up to US $8.00 to cover distribution and handling. (3) You state YOUR fee is NOT payment or registration for OUR software. (4) You clearly encourage registration by stating that con- tinued use justifies sending contributions to the developer. ================================================================== Using MENU MAGIC (MM.Exe) MM.1 ================================================================== Menu Magic is a fast, easy-to-use program that helps in 2 ways: 1. Run it, then just "fill in the blanks" to create SCROLLING BAR MENUS -- with mouse support, colors, drop shadows, etc.. 2. It will then write your batch files for you! When you've finished running MM.Exe, you can immediately run and test the batch file MM created. But note that as you select menu options, your batch file will simply tell you which option you selected. MM can't know what you want done as each option is selected. So it's up to YOU to EDIT this batch file: jump down to the middle/end of the batch file and edit each "option section" -- to accomplish what YOU want to happen as options are chosen. MM is a "front end" to Sparkle. Use MM to design your menus and write your batch file. When you run this batch file, Sparkle takes over and turns your "menu screens" into colorful, scrolling bar menus, complete with mouse support! Using Menu Magic couldn't be easier: * Just type in your menu options (and a title if you like). * Choose the colors you want. * Then press a key and MM will write your batch file for you. You should then edit this batch file to customize the last section -- so that as you choose menu options, your batch file does what YOU want it to do. MM offers TWO ways to display your actual menu screens. * You can save menu screens as executable ".COM" screens. Just "run" these screens to display your menu screens instantly! - You can see examples of .Com screens by running Demo.Bat. It runs several .Com screens we included with Sparkle. We created these .Com screens using our P-Screen program. P-Screen offers you more screen-design options than MM can. See "More Options" for details. * Or, if you prefer, MM will write your batch file in such a way that Sparkle "draws" your screen -- with colors and shading -- using Sparkle's "window" and "quick-print" options. TO USE MM: MM.2 ========== At the DOS prompt type: MM Creating menus takes 4 simple steps: 1. Enter your menu options (and a title if you want one). 2. Tell MM how to "create" your screen (create an "executable" .Com screen, or "draw" your screen using Sparkle's options). 3. Give us a name -- the name of your batch file. 4. Choose colors. When you run MM, a screen like the one below appears. ================================================================== Title: ___________________________________ ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ Option: ___________________________________ ³ Working on: ³ ³ ³ Option: ___________________________________ ³ Title ³ ³ ³ Option: ___________________________________ ³ ³ ³ ³ Option: ___________________________________ ³ Alt-C = Center ³ ³ It is now: OFF ³ Option: ___________________________________ ³ ³ ³ Esc = Quit ³ Option: ___________________________________ ³ ³ ³ = Done ³ Option: ___________________________________ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ Option: ___________________________________ Enter a TITLE for your batch file menu (optional), plus up to 8 menu options (1 - 40 characters each). You may leave any field blank. Press to quit (exit MM and save nothing). ================================================================== NOTE: Press (the Escape key) to exit MM to DOS. Nothing will be saved. So press only if you're sure you want to cancel whatever you began. Using MM (continued) MM.3 Entering a Title ================ When MM starts up, it highlights the area beside "Title" (shown as "_____" above). Enter a title if you like -- it's optional. NOTE: Titles are always centered on the top line of your menu. Feel free to center it on MM's screen if you like. But you don't have to since we'll center it when we later draw your menu. Entering Menu Options ===================== Once you enter a title (or not, it's your choice), press or the Down cursor key. MM then highlights the first menu "Option." * You can enter up to 8 menu options. Each may have 1 - 40 char- acters. If you need more than 8 options see "More Options." * MM begins with "centering mode" ON -- when you press , anything you typed in will AUTOMATICALLY be centered. Press alt-C to turn "centering mode" OFF (or back on again). If centering mode is OFF, menu options will appear exactly as you enter them. Toggling centering mode on/off does NOT affect anything you've already entered -- just the line you're currently on, and any others you type in later. * You can leave any of the 8 options blank. This lets you separate 1 or more options from others by leaving blank lines in between. For example, some people like to separate "Quit" from their main menu options. Or they separate "clusters" of related options from other clusters -- with blank space in between. Creating om Screens, or rawing Screens MM.4 ============================================ Press function key when you're done entering menu options. (Press to quit to DOS without saving what you started.) When you press , MM will ask two questions: 1. Do you want to save your menu as a ".COM" screen? Or should MM DRAW your menu using Sparkle's options. 2. What NAME should MM use to create batch file(s)? The first question will actually look like this: "Do you want to display the menu with a COM screen, or draw it using Sparkle's options? Press om or raw." * Note that if you press , you're telling MM to write your batch file in such a way that Sparkle's "Window" and "Quick- Print" options will be used to display your menu. .Com screens display instantly. So they're often the best way to display menus. But .Com screens are separate files. If you're concerned that this file might be separated from your batch file, you might want to raw your menu -- the safest (but slowest) option. * MM is v-e-r-y easy to use. So experiment with both approaches to see which you prefer, which suits your needs the best. The 2nd question actually looks like this: Enter a 2 - 8 character file name [default = MENU]. DON'T add an extension (e.g.,'.Bat'). We'll add ".BAT" for you. * Just type in a 2 - 8 character file name, then press . * If you leave the name blank, MM will create "MENU.BAT." * Please DO NOT enter extensions. We'll add ".Bat" to your batch file name. And if you asked to save a ".COM" file menu screen, we'll create an "executable screen" with a name **similar** to your batch file -- but with a ".COM" extension. More on this "similarity" shortly Warning ======= If you enter a file name that already exists, MM will OVERWRITE it -- without warning! So, if you're not sure if a .Bat or .Com file already exists, enter a very unusual name (like 999_xxx). Then, after MM saves your files, just rename the .Bat and .Com files to anything you like. And be sure to edit your batch file to update the name of .Com screen you're displaying. Executable .COM Menu Screens MM.5 ============================ If you tell MM to save "executable" .COM screens, it saves them with the "file name" you entered -- but with the first letter changed to "!". For example: * If you save MENU.BAT, MM saves your COM screen as !ENU.COM. * If you save LOGON.BAT, MM saves the COM screen as !OGON.COM. The reason for the unusual (ugly?) names for .Com files is that we CANNOT save both a .Bat and a .Com file with the same name. Why? * Suppose we saved both Menu.Com and Menu.Bat. Later, when you type "menu " to run Menu.Bat it would NEVER run! Menu.Com would run instead! * That's because when you run a program, DOS first looks for a .Com file by that name. If found, DOS runs it. If DOS can't find it, it looks for an .Exe file by that name. If found, DOS runs it. If not found, DOS then looks for a .Bat file. Since ".BAT" files are LAST in this "pecking order," if you have a batch file with the SAME NAME as a .Com or .Exe file, your batch file may never run! Feel free to rename the file(s) MM saves to anything you like. But if you change the name of .Com screens, be sure to edit your batch file to reflect the new file name. CHOOSING COLORS MM.6 =============== Finally, once you tell MM HOW to save your menu screen, it will display your menu screen and give you a chance to choose colors. By default, MM creates menus with: * a blue shadowed window * a single-line border around the window * a green backdrop (to highlight the blue window) You may change one of these, all of them, or any combination. To do so, just press the cursor pad keys (you'll see instructions at the bottom of your screen). As you press the cursor pad keys, you'll see your menu change. * Press ARROW keys to change the colors of the menu window itself. - Press Up/Down to select from 15 different foreground colors. - Press Left/Right to select from 8 background colors. * Press HOME or END to change the border style. There are 5 alternatives. Try them all to see which you prefer. * Press PGUP or PGDN to change the color of the backdrop. One of the options is black. If you choose this, you'll see no backdrop AND no shadow under the menu window -- since black shadows are invisible on black backgrounds. NOTE: The menu options themselves are printed in white on black. * We opted for simple colors here so your menu options would be "readable" on ANY monitor -- color or monochrome. * If you prefer different colors, select the raw option (not the .Com screen option). Then edit the batch file and change the colors Sparkle uses to display text. Press when you like what you see. MM will then save both your screen and your batch file to disk. Vertical (not Horizontal) Menus. Why? MM.7 ====================================== MM creates VERTICAL scrolling bar menus. But Sparkle can handle either vertical -OR- horizontal scrolling bar menus. Why can't Menu Magic create horizontal menus? For two reasons. * First, we offer another program (P-Screen) with which you can create almost any text-mode screen you like. You can save these screens to "compressed" .Com screens (or to "screen libraries" or ASCII files, etc.). P-Screen's ".Com" screens are about 1/2 the size of those MM creates -- thanks to P-Screen's screen compression. And P-Screen makes it very easy to add colors, draw lines and boxes, add shading, move things around, copy or erase things, add Big! Font messages (in over 20 Big! Font styles for bold, attention-getting titles), etc. You'll see several of P-Screen's screens when you run Demo.Bat -- which also demonstrates Sparkle's other menu options. * Second, we wanted to keep Menu Magic small, fast and to-the- point. Since vertical bar menus are the most popular and flexible type of scrolling bar menus, and since we didn't want to duplicate capabilities that already exist in P-Screen, we built MM to offer the most widely used option. Menu screens DON'T mention ! ==================================== Menu screens that MM creates do NOT mention that you can press to exit menus altogether -- but that option DOES exist! * Once Sparkle turns your screen into a bar menu and takes over, users must select an option -OR- press to exit. * But what should we do if users press ? We can't know what YOU'D want to do, so we don't mention it. * Some people create menus with explicit options to "Quit." Others prefer to use as the Quit key. If you want users to know they can press to do something, display a message (using "Echo" or Sparkle's "Quick Print" option) to tell users to press to quit. More Options (More than 8 Menu Options) MM.8 ======================================= MM lets you enter up to 8 menu options. This lets us display options attractively, without crowding. But if you need more than 8 options, you have several choices. First, note that Sparkle can handle up to 25 menu options on VERTICAL scrolling bar menu. And Sparkle can also create horizontal scrolling bar menus. Finally, if you use Sparkle's "ASK" option, you can to turn ANY screen (text -OR- graphics) into a menu -- with as many options as you like. Just display a screen telling users to press a key to make a choice. Then run Sparkle and tell it which keys the user is allowed to press. When users press one of these keys, Sparkle will exit, telling you which key they pressed (Sparkle sets the DOS errorlevel to let you know). In other words, Sparkle can turn ANY screen into a menu. You don't necessarily need MM to create the screen for you. But if you use Menu Magic, and you need more than 8 menu options, you can: 1. Include, on your menu, the option to go to another menu, which can display up to 8 more choices. There's no limit to the number of menus you can have. And each menu can branch to other menus -- one option going forward, and another option branching back go to an earlier menu. To elect this format, use MM to create 2 or more batch files. Then merge them together into one batch file. 2. Create your menu screen in other ways. * Use the batch ECHO command to display your menu. * Use Sparkle's Window and Quick Print options to display your menu -- with windows, shadows and colors if you like. * Or use our P-Screen program to create any text-mode screen you like. P-Screen lets you save screens to screen libraries or ASCII files, which you can later edit. ================================================================== Using SUPER SPARKLE (SS.Exe) SS.1 ================================================================== Sparkle is fun! So please experiment with its many options, sounds, colors, etc. For a list of options, type: SS Sparkle will display this (PRINT this as a quick reference guide): Sounds SS 1 # #2 (# = 1 to 35, 88 or 99; #2 = # of times) Bar Menu SS 2 TopRow LeftCol BotRow RightCol Color Direction Ask SS 3 Row Column Color /ValidKeys /Text Big! Font SS 4 Row Column Color CharacterCode /Text QuikPrint SS 5 Row Column Color /Text Window SS 6 TopRow LeftCol BotRow RightCol Color Frame /Text Pause SS 7 HowLong (optional: 99 = allow interrupt) Monitor SS 8 (optional: 99; Errorlevel = 1 if mono monitor) Paint SS 9 TopRow LeftCol BotRow RtCol Color # (1=All, 0=Border) Reverse SS 10 TopRow LeftCol BotRow RtCol #Times # (1=All, 0=Border) Bright BG SS 11 # (1=Bright Backgrounds On, 0=Off) Get Resp. SS 12 Row Column Color Length # (1=Env./0=File) /Text /Name DOS Ver. SS 13 (Errorlevel will be 21, 30, 40, 62, etc.) View File SS 14 TopRow LeftCol BotRow RhtCol Color /File Name Prompt SS 15 Row Column Color # (# = 1, 2 or 3) Dark Blue SS 16 # (1=Dark Blue background on VGAs, 0=normal colors) BIGScroll SS 17 Color Char.Code Font# (1=B'Way, 2=Normal) #Times /Text Fade_outs SS 18 # (option 1 - 9) Color Slowdown (1 - 20) B'Way Font SS 19 # (1=B'way, 0=Normal) VGA Appears w/ LOW intensity text Choosing Options ================ Note that each option has a NUMBER. To select options, just run Sparkle and type in a number. For example: SS 1 (sound effects). Each option also has sub-options (or instructions) you send Sparkle. In general, run Sparkle like this: SS Option_# 1 2 3 4 ..... Where: Option_# is a number from (1=Sound, 2=Menu, etc.) 1, 2, 3 ... etc. are sub-options (or instructions) Notice: * A space MUST separate each item on the command line. * If we ask for numbers, send only numbers (not A - Z). * When you send us text, begin it with "/" (we'll explain shortly how to begin text with other than "/" -- in case you must use "/" in your text). Color: Several options require a Color -- a # from 1 - 255 telling us which foreground AND background color to use. See "Choosing Color Numbers" for tips on choosing colors. Errorlevel: Some options return a DOS Errorlevel. See "Testing Errorlevels" and the description of each option. Examples: SS.2 ========= SOUNDS SS 1 14 1 = Sound Effects. 14 = the 14th sound effect. BIG! FONT SS 4 1 1 112 219 /Big! Font 4 = print Big! Font messages. Other items tell us: - WHERE to print it (row 1, column 1 in this example). - The COLORS to use (112 in this example: black letters on a white background). - Which character to CONSTRUCT your message with (ASCII 219 in this example; use ANY number 1 - 254). - And WHAT to print ("Big! Font" in this example). ASK SS 3 25 35 15 /123 /Press 1, 2 or 3 3 = Ask (print a message or prompt and wait for a key). Other instructions tell us where to print it, what color to use, and what message to print. PROMPT SS 15 25 23 78 3 15 = Prompt (print a dynamic prompt or message to tell users it's time to press a key). - "25 23" tells Sparkle to print the prompt on line 25, column 23. - "78" tells us to use color 78 -- bright yellow on a red background. - And "3" selects the 3rd prompt option: a scrolling "Press any key to continue . . .". An IMPORTANT Note about sending TEXT ==================================== For many Sparkle options, you'll specify "text" you want displayed. TO PAD BOTH ends of that text with , begin AND end that text with "/" (or the "text marker" you've chosen; more on this later). For example, to SCROLL a tall message across the screen AND have it clear itself, send Sparkle instructions like this: SS 17 4 219 0 0 /Scroll this message / ^^^^^^^^^^^ The extra spaces followed by "/" causes the message to clear itself from the screen. Debugging Batch Files; Sparkle's Error Codes SS.3 ================================================================== Sometimes batch files (like any "program") do things we didn't anticipate. And we sometimes make mistakes when developing them. But figuring out what went wrong can often be difficult -- since batch files don't give us obvious feedback about our mistakes. Fortunately, Sparkle lets you turn "test mode" (SPT) ON. This tells Sparkle to DISPLAY the results of various options. To do this, at the DOS prompt type (note: "SPT" means Sparkle Test): SET SPT=? (NO spaces except after "SET") where "?" is: - Any character -- which will cause Sparkle to display the ErrorLevel at row 25, column 77, then move on. - PAUSE (the word PAUSE) -- which causes Sparkle to print the ErrorLevel, then wait for you to press a key before moving on. To turn this option OFF, type: SET SPT= (nothing after "="). How does this help? =================== Suppose you run Sparkle and nothing happens. Why? If you don't SET SPT=, you may never know. But if you SET SPT=, Sparkle might suggest that you did something wrong by displaying one of these error codes (and by setting the DOS errorlevel to these numbers): 255 - Option number out of range: you specified no option, or the option number you specified was GREATER than the highest option Sparkle offers. 254 - Illegal screen coordinates (e.g., a Row or Column of 195) 253 - No menu options found (scrolling bar menus); or, File not found (View File); or, No text sent (for options that print text, Big! Fonts, etc.) Or, suppose you use Sparkle's dynamic PROMPT option and want to BRANCH depending on which key a user presses. You add "If error- level ..." statements to your batch file -- but they're not working. If you turn SPT ON, Sparkle will display the ASCII values of keys pressed. You might discover, for example, that you asked users to press , but didn't count on someone pressing . Or you might have expected UPPER case letters, and didn't anticipate lower case letters. NOTE: SET SPT= requires "environment space." See "Running out of Environment Space" later in this manual. Changing the "Text Marker" -- SET SPM=? (edit "?") SS.4 ================================================================== Several of Sparkle's options ask for text (e.g., Window), or a mes- sage (Big! Font) or a prompt or list of "valid keys" (Ask), etc. By default, Sparkle expects you to begin text with "/" -- Sparkle's "text marker." But sometimes you must include "/" as part of your text or message. If so, you can CHANGE the text marker. To do so, at the DOS prompt (or in batch files), enter: SET SPM=? ("SPM" means Sparkle Marker; NO spaces except after "SET") where "?" is ANY ASCII character you want to use to begin text. For example: SET SPM=~ \ These tell Sparkle you'll use "~", or SET SPM=[ ) "[" or "@" to mark the beginning of SET SPM=@ / text. You can then use "/" AS text! To turn this feature OFF (to restore "/" as the text marker), type: SET SPM= (notice there's nothing after "="). NOTE: See "Running out of Environment Space" below. ALSO NOTE: If you run a batch file and Sparkle prints NO TEXT, the likely cause is that SET SPM= and your batch file are out-of- synch: your batch file is using one text marker, but you've used SET SPM= and told Sparkle to look for a different marker. Running out of Environment Space ================================================================== DOS sets aside a small amount of RAM memory ("environment space") to store "environment variables" (in DOS 6.2, the default amount of environment space is 256 bytes). DOS stores several things in this "environment" -- your PATH statement, your PROMPT $... choices, COMSPEC=...., etc. To see what's already in your environment, type: SET . 256 bytes isn't much. And if your environment is already full, you may not be able to use SET SPT= or SET SPM=. Similarly, Sparkle's "Get Input" option lets you ask users to enter a 1 - 80 character response (like their name). Sparkle can then save their response, either to a file, or in the "environment variable" you specify. But, if a user's environment space is full, Sparkle will fail -- it won't be able to SET the variable you specify to what users enter (it WILL set the ErrorLevel to 100+, however). You (or your users) can INCREASE environment space by editing your CONFIG.SYS file and add/editing a line that looks this: shell=C:\DOS\COMMAND.COM /e:512 "/e:512" reserves 512 bytes of RAM for environment variables. Option 1: SOUND EFFECTS SS.5 ================================================================== To use: SS 1 # #2 (# = 1 to 35, 88 or 99) (#2 = # of times) Purpose: To give you over 35 simple-to-complex sound effects. You may also repeat sound effects "#2" times (-or- until users press a key). This is optional; you can omit #2. * Sound #88 = a ringing phone * Sound #99 = part of the William Tell Overture Examples: SS 1 99 ^ ^ | }"99" means play part of the William Tell Overture | }option 1 (Sound Effects) Replace "99" with 88 or any number from 1 to 35. Numbers 6 through 14 offer compound sounds -- trills, "Oh Oh," etc. Other numbers are simple tones of various durations. SS 1 6 25 ^ ^ ^ | | }repeat the sound 25 times, OR until a key is pressed | | | }sound effect #6 | }option 1 (Sound Effects) If you include "#2" ("repeat sounds"), Sparkle plays the sound, then repeats it # times (for a total of 26 in this example). This is useful, for example, when you want to begin a LONG process (like de-fragmenting your hard disk), ignore your PC as it happens, then have Sparkle alert you when it's done. You can repeat sounds up to 9,999 times! This effectively means that sound effects will continue until you press a key. Depending on which sound you choose, 9,999 times could mean a few minutes, a few hours or a few days! * Remember, you can press a key to stop! * But you'd better tell users that. You can press a key at any time to stop sounds played multiple times. Between each sound effect, Sparkle pauses just a bit to ensure the sounds don't blend into one. Sounds 88 and 99 may NOT be repeated -- they're simply too long. NOTE: Sparkle checks to see what type of CPU is being used. It does this to ensure sounds are comparable regardless of whether an 8088, 286, 386, 486, Pentium, etc. is used. In other words, the sounds should be similar regardless of how fast the PC is. But speakers will affect sounds. Option 2: SCROLLING BAR MENUS SS.6 ================================================================== To use: SS 2 TopRow LeftCol BotRow RightCol Color Direction Purpose: To turn ANY text-mode (not graphics-mode) screen into a Vertical -or- Horizontal scrolling bar menu -- WITH mouse support! Here's what you do: 1. Display a screen. You can use Sparkle's Window and Quick Print options to create a menu. You can "echo" text in a batch file. Or you can run "executable .Com screens" and blast screens up. 2. Then run Sparkle like this: SS 2 TopRow LeftColumn BotRow RightColumn Color Direction Where: - "2" = Option 2 (Scrolling Bar Menus) - TopRow, LeftColumn, BotRow, RightColumn indicate WHERE the menu options are on your screen (screen "coordinates"). - Color is a number from 1 - 127 (usually) indicating the color we should use to HIGHLIGHT menu options. If zero, we'll use 112 (black on white). See "Choosing Color Numbers" for help on determining this color number. - Direction = 1 (vertical menu) or 2 (horizontal menu) NOTE: To determine TopRow, LeftColumn, BotRow and RightColumn: 1) Run "Ruler.Exe" -- our RAM-resident ruler. When your menu screen is visible, call up Ruler. Move the cursor to the top left corner of your menu. Write down the Row/Column, then move to the bottom, right corner. Note its Row/Column, then uses these numbers in your Sparkle command. 2) Or you can manually count rows and columns. 3. Test Errorlevel. (See "A Note About Testing Errorlevels") Sparkle returns a DOS Errorlevel indicating which option was selected. Interpret the Errorlevel like this: 1 to x = The number of the option chosen (1 = the 1st option, 2 = 2nd option ... x = last option) 27 = Esc was pressed 254 or 255= Either your screen location variables were "wrong" (e.g., Top Row <> Bottom Row). Or we found no TEXT / Menu Choices in the area of the screen where you said your menu would be. Scrolling Bar Menus (continued) SS.7 =================================================================== SS 2 5 45 20 78 79 1 ^ ^ / ^ / | ^ | |/ |/ | }It's a Vertical menu (choices up/down) | | | | | | | }Highlight menu options in White on Red | | | | | }menu ends on row 20, column 78 | | | }menu starts on row 5, column 45 | }option 2 (Scrolling Bar Menus) IMPORTANT NOTES on Creating Bar Menus: : : : ============================================ 1. Once you define your menu's " screen coordinates," we scan the screen looking for "menu text." We ignore blank lines and lines with only "graphics" (lines, boxes or shading). - ANY text found inside your screen coordinates WILL be considered menu text -- UNLESS you begin that line of text with ASCII character 255. Character 255 tells Sparkle to ignore lines of text (which might explain what users should do, that you use to introduce something, etc.). You can enter character 255 in two ways: a) Create menu screens using our P-Screen program. Move the cursor to the beginning of each line of text you want us to ignore. Press Alt-A to display the "ASCII" chart. Move the cursor to the last character in the chart (it will look blank). Press to accept it. b) Most word processors or editors let you enter "High ASCII" characters. Load your menu screen into your word processor. Move the cursor to the beginning of any line of text you want us to ignore. Hold down the Alt key, then type "255" on the NUMERIC KEYPAD of your keyboard (DON'T use the numbers at the top of your keyboard. Character 255 looks blank space on your screen. You can "paint" it any color you want, or move, copy or delete it. 2. In Horizontal menus, use character 255 to "link" 2 or more words that are part of the same menu option. For example: Lotus 123 Paradox WordPerfect Quit This menu has 4 options. But notice the space between "Lotus" and "123". If we don't plug that space with char- acter 255 (or ANY non-space character), Sparkle WILL treat "123" as a menu option -- giving us 5 not 4 options. Important Notes on Scrolling Bar Menus (continued) SS.8 ================================================================== 3. In VERTICAL menus, each line should be a single menu choice. * Each line can include as many words as you like (and you needn't fill blanks between words with character 255). * If a menu option needs 2 or more lines, start the 2nd, 3rd, etc. lines with character 255 -- so we ignore them. 4. In HORIZONTAL menus, ALL menu options must be on ONE line. And the first line of text we find that does NOT begin with character 255 will be treated as your menu line. NOTE: TopRow and BotRow are usually the SAME for horizontal menus! 5. Sparkle HIGHLIGHTS menu choices using the color you specify. To ensure the highlight is visible, BE SURE to use a color that contrasts with the basic colors of your menu. If you don't, the menu highlight will be hard or impossible to see. For example, if your menu is blue or red (i.e., dark), try 112 (black on white). But if your menu is light (cyan, white, yellow, etc.), consider a red (79) or blue (31) highlight. See "Choosing Color Numbers" for a chart that can help you choose a "color number." NOTE: In earlier versions of Sparkle we highlighted menu option by REVERSING colors. This simplified your task since you didn't have to tell us what color to use. BUT, we got reports that *some* reversed colors were invisible on some monitors. So we returned to the earlier approach (speci- fying a color) to give YOU greater safety and flexibility. 6. Using a MOUSE to select options in bar menus: * Click the LEFT button on any option to *highlight* it. * DOUBLE click the LEFT button on options to *select* them. * Sparkle uses only the left mouse button; it ignores others. 7. Using the KEYBOARD to select options in bar menus: * *Highlight* an option, then press to accept it. * To highlight options, press the Up or Down cursor keys, -or- press the first letter of the option you want. If 2 or more options begin with the same first letter, keep pressing that letter until we highlight the option you want. Option 3: ASK SS.9 ================================================================== To Use: SS 3 Row Column Color /ValidKeys /Text Purpose: ASK lets you turn ANY screen into a menu screen. Or use ASK to pause until users press a key. You can: 1) display messages anywhere on the screen (text mode ONLY) 2) display them in any color you want 3) wait for users to press one of the keys you specified, then report an Errorlevel indicating which key was pressed. (See "A Note About Testing Errorlevels") YOU specify which keys we should exit on (Sparkle also exits when Escape is pressed). For example, suppose you display a menu and ask users to choose options by pressing 1, 2, 3, 4 or Q to Quit. - Just tell us the Valid Keys are 1234Q. - If "ValidKeys" is NULL (empty or nothing), we'll wait until ANY KEY is pressed, then exit with Errorlevel set to 0. Example: SS 3 25 35 112 /1234q /Please press 1, 2, 3, 4 or [Q]uit ^ ^ / ^ ^ ^ | |/ | | }print the message beginning with "/" | | | | | | | }wait until user presses one of these keys | | | | | }print the "prompt" in color 112 (black on white) | | | }print on Row 25, Column 35 | }option 3 (ASK) NOTES on Ask ============ - If ValidKeys AND Text are both blank, Sparkle prints nothing and simply waits until users press ANY key. - Sparkle sets the DOS Errorlevel to indicate which key was pressed. -- 27 means Escape was pressed. -- Otherwise it's the Ascii code of the UPPER CASE key pressed. APPENDIX III lists the Ascii codes for many keyboard charac- ters. Note that Sparkle returns UPPER case keypresses. We don't distinguish a from A. But your list of Valid Keys can be in upper or lower case (or both). -- See "Notes on Testing Errorlevels" for examples of how to deal with these. - IMPORTANT: You MUST use the "text marker" (/=default) to begin BOTH your list of valid keys AND the text to be printed. ÝÝÝÝÝÝ ÝÝÝÝ ÝÝÝÝÝ ÞÞ ÎÎÎÎÎÎÎ ØØ SS.10 ÝÝ ÝÝ ÝÝ ÝÝ ÝÝ ÞÞ ÎÎ Î ØØ ÝÝ ÝÝ ÝÝ ÝÝ ÝÝ ÞÞ ÎÎ Î ººººº ³³³³³³ ØØØØØØ ÝÝÝÝÝ ÝÝ ÝÝ ÞÞ ÎÎÎÎ ºº ºº ³³ ³³ ØØ ÝÝ ÝÝ ÝÝ ÝÝ ÝÝÝÝ ÞÞ ÎÎ Î ºº ºº ³³ ³³ ØØ ÝÝ ÝÝ ÝÝ ÝÝ ÝÝ ÎÎ ºº ºº ³³ ³³ ØØ ÝÝÝÝÝÝ ÝÝÝÝ ÝÝÝÝÝ ÞÞ ÎÎÎÎ ººººº ³³ ³³ ØØØØ ================================================================== To Use: SS 4 Row Column Color CharacterCode /Text -4 Row Column Color CharacterCode /Text Purpose: Big! Font, prints messages 7 - 8 lines high. Each character will be 8 columns wide. You can: - display Big! Font messages anywhere on the screen - display them in any color you want - "build" messages using ANY ASCII character NOTE: Using "-4" tells Sparkle to use ALTERNATING colors. While foreground colors are fixed (run Demo.Bat to see examples), you STILL send a Color # to tell Sparkle which BACKGROUND color to use. Example: SS 4 9 1 12 219 /Hi There ! ^ ^ / ^ ^ ^ | |/ | | }print the message beginning with "/" | | | | | | | }"Build" characters using ASCII character 219 | | | | | }print in color 12 (Bright Red on Black) | | | }begin printing on Row 9, Column 1 | }option 4 (Big! Font) NOTES on Big! Font ================== * Since each character is 8 columns wide, only 10 Big! Font characters fit on 80-column screens. * "Row" is the TOP row on which to begin printing. Most Big! Font characters will have 7 lines. But characters with descenders (g, y, q, p, etc.) also need the 8th line. - Be sure to specify a Row 7 - 8 lines above the bottom of your screen -- or you won't see the bottom of the characters. - Sparkle WILL print on 43- or 50-line screens. * Sparkle "builds" characters using the ASCII character you specify. If you specify "0" we'll build each character using THAT char- acter (ie., we'll build a "G" with Gs, an "X" with Xs, etc.). - Use 219 - 223 for bold, solid or "striped" characters. - Use 1 or 2 for "happy faces," 176 - 178 for shaded characters. - ANY ASCII character from 1 to 254 will work. Option 5: QUICK PRINT SS.11 ================================================================== To use: SS 5 Row Column Color /Text Purpose: Quickly print text ANYWHERE on your screen in ANY color. You can print ANY Ascii character from 1 - 255 -- you're not limited to printing normal keyboard characters. Example: SS 5 25 25 112 /Good Morning ^ ^ / ^ ^ | |/ | }print the message beginning with "/" | | | | | }print in color 112 (black on white) | | | }begin printing on Row 25, Column 25 | }option 5 (Quick Print) Option 6: WINDOWS SS.12 ================================================================== To Use: SS 6 TopRow LeftCol BotRow RightCol Color Frame /Text SS -6 Draws an EXPLODING window (all else is the same). Exploding windows GROW to the size you specify. Purpose: Quickly display windows (boxes) on the screen in any color. - Choose from over 250 frame styles! - Windows can be shadowed (send NEGATIVE Frame #), or not. - You can include a "title", centered on the top row. - NEGATIVE color #s mean FILL areas with ASCII characters. Frame Sparkle offers over 250 frame styles. Select these by styles: setting "Frame" to 1 to 255. Frame #s 1 - 5 include: 1 = Single line all around (Ú) 2 = Double line all around (É) 3 = Double horizontal line, single vertical line (Õ) 4 = Single horizontal line, double vertical line (Ö) 5 = Bolder solid line (Þß) 6 = Like 5, but 2 corners are "notched" Frame numbers from 7 - 255 tell Sparkle to draw window in that ASCII character. Filling NEGATIVE color numbers tell Sparkle to FILL areas with the Windows ASCII character you send as a Frame #. For example, try: 7, 249 or 250 = dots of various sizes (can't show here) 32 = The Space character -- a solid patch of color etc. You get the idea. Experiment! Frameless ASCII characters 32 and 255 are blank. Use these frame Windows: "styles" to create frameless splashes of color! Use -32 or -255 to get shadowed splashes of color! Titles: Sparkle centers "/Text" on the top row of the window. Shadow: To request a "drop shadow" for windows, send Sparkle a NEGATIVE frame number (e.g., -2). Shadows are drawn right of and below your window. Be sure to allow for TWO extra columns on the right, and ONE extra row on the bottom of shadowed windows. Example: SS -6 5 7 20 75 79 -1 /My Window ^ ^ / ^ / ^ ^ ^ | |/ |/ | | }Center this title on the top line | | | | }Frame style 1 (negative = shadowed) | | | }Use color 79 (White on Red) | | }Window ends on row 20, column 75 (shadow below) | }Window starts on row 5, column 7 (shadow on right) }option -6 (Exploding Window) Option 7: PAUSE SS.13 ================================================================== To Use: SS 7 HowLong 99 (99 is optional; it means let users press a key to interrupt the pause) Purpose: To allow batch files to briefly pause, then continue. - You may pause from 1/3 second to several minutes. - By adding "99" you'll let users "interrupt" (bypass) the pause, and move on. This is optional. Examples: SS 7 12 ^ ^ | }Pause for 4 seconds (each # = 1/3 second) | }option 7 (Pause) SS 7 15 99 ^ ^ ^ | | }Pause, but let user "press a key" to go on | | | }Pause for 5 seconds (each # = 1/3 second) | }option 7 (Pause) NOTES on Pause ============== * "HowLong" is measured in 1/3 second increments. "12" tells Sparkle to pause 4 seconds (12/3 = 4). Similarly, "24" means pause 8 seconds (24/3 = 8). An easy way to decide what number to use is to decide how many SECONDS you want to pause, then MULTIPLY that by 3. * To let users "press a key" to interrupt the pause and move on, send Sparkle 2 numbers: HowLong -AND- 99. For example: SS 7 6 99 (pause 2 seconds; but let users proceed) * Sparkle checks to see what type of CPU is being used -- to ensure pauses are the same regardless of whether an 8088, 286 386, 486, Pentium, etc. is being used. HOWEVER, the speed of disk drives WILL affect pauses. That's because Sparkle must load first, and then pause. While Sparkle is small and loads quickly, floppy disks are 10 - 20 times SLOWER than hard disks. If your batch files will run off of different types of disks, test them on different drive types to determine the length of a pause that's a "happy medium" on all drives. Option 8: MONITOR SS.14 ================================================================== To Use: SS 8 99 ("99", optional, is explained below) Purpose: Report what type of display adapter AND monitor is active. This can help you select colors to use in batch files -- those appropriate for color or mono monitors. Example: SS 8 ^ }option 8 (Monitor type) SS 8 99 ^ ^ | }Set Errorlevel=1 if a monochrome monitor is detected | (regardless of the type of display adapter present) | }option 8 (Monitor type) NOTES on Monitor ================ * Option 8 tells Sparkle to set the DOS Errorlevel based on BOTH the type of display adapter AND the type of monitor detected. If you run Sparkle with NO options (ie., Sparkle 8), it sets the Errorlevel as follows: 1 = Monochrome adapter 2 = Hercules adapter 3 = CGA adapter 4 = EGA adapter/Mono monitor 5 = EGA adapter/Color monitor 6 = VGA adapter/Mono monitor 7 = VGA adapter/Color monitor 8 = MCGA adapter/Mono monitor 9 = MCGA adapter/Color monitor 10 = EGA adapter/CGA monitor 11 = IBM 8514/A adapter * NOTE that options 1, 2, 4, 6 and 8 ALL indicate a monochrome monitor is being used. If all you must know is if the monitor is Color or Monochrome, run Sparkle like this: SS 8 99 - "99" tells Sparkle to set Errorlevel = 1 when monochrome monitors are detected (ie., if Sparkle would normally report 1, 4, 6 or 8). - This can simplify testing Errorlevels to something like: If Errorlevel 3 goto ItsColor 'If greater than or equal to 3.. Goto ItsMonochrome 'Otherwise, assume it's mono. THE NEXT PAGE has examples of how you can use Option 8 to set options "on the fly" in batch files. Option 8 MONITOR (continued) SS.15 Two DOS features (SET and "named parameters") can help customize batch files (select appropriate colors) -- depending on the type of monitor Sparkle tells you is active. (These features may NOT be available with early DOS versions -- 2.x or earlier.) "Named parameters" let you define "variables" you can use later in batch files. Basically, you: * Use DOS' SET command to SET variable(s) to specific values (e.g., SET ErrSound=12, or SET MyColor=15, or SET HiLite=112). * Run Sparkle and use variable NAMES rather than values (e.g., SS 1 %ErrSound% -- note "%" on BOTH sides of "ErrSound"). Here's an example. Notice how we will: 1. Run Sparkle to see if a color monitor is being used. 2. Depending on the type of monitor detected (color or mono), we SET a variable called "WhichClr" to a color appropriate for that monitor. "WhichClr" will now be available to every other line in our batch file -- as long as we use the variable name. 3. We then use the variable NAME to tell Sparkle which color to print with. -- NOTICE that when we use variables in batch files, we place it between TWO percent signs (e.g., %WhichClr%). This is REQUIRED by DOS! SS 8 99 '"99" since we only need to 'know if it's color or mono If Errorlevel 3 goto _PrtInColor 'if 3 or higher, it's color Set WhichClr=112 'If 1 or 2, it's a 'monochrome monitor; use 'simple Black on White. SS 5 21 15 %WhichClr% / MONOCHROME monitor detected goto Got_Monitor ("jump" over the Color section) :_PrtInColor Set WhichClr=78 'It's color, SET "WhichClr" 'to 78 (Yellow on Red). SS 5 21 15 %WhichClr% / COLOR monitor detected :Got_Monitor (continue. . .) Option 9: PAINT SS.16 ================================================================== Note: Paint and Reverse Color work in similar ways. And you can use paint and reverse in quick succession to create some interesting displays. See "Notes on Paint and Reverse Color." Syntax: SS 9 TopRow LeftCol BotRow RightCol Color_# # Purpose: Paint any area of text screens in any of 255 colors. - Paint anything from 1 character to the full screen, or any rectangular area in between. - You can paint using blinking colors if you like. And you can paint the entire area, or just the border around the area. - If you "turn on" bright backgrounds (option #11), and then paint with blinking colors, they'll be displayed as stunning bright backgrounds (on most color monitors). See Option 11, Bright Backgrounds for details. To Use it: SS 9 TopRow LeftCol BotRow RightCol Color_# # Where: - "9" = Option #9 (the Paint Screen option) - TopRow LeftCol BotRow RightCol indicate the rectangular area of the screen you want to paint. The top left corner of your screen would be row 1, column 1. The bottom right corner of 25-line screens would be 25, 80. - Color_# is a number from 0 to 255 indicating both the foreground and background color. See "Choosing Color Numbers" for details. - "#" is 1 or 0. If it's 1, Sparkle paints the entire area you specified. If it's 0, Sparkle paints just the border around the area. Option 10: REVERSE COLOR SS.17 ================================================================== Note: Paint and Reverse Color work in similar ways. And you can use paint and reverse in quick succession to create some interesting displays. See "Notes on Paint and Reverse Color." Syntax: SS 10 TopRow LeftCol BotRow RightCol Times # Purpose: Reverse colors in any area of text screens. By "reverse" we mean that the foreground color becomes the background, and the background becomes the foreground. - "Times" means "how many times." If it's greater than 1, we'll reverse the colors, pause about 1 second, then reverse them again, then again, then .... as many times as you specify. This is very handy to draw attention to areas of the screen, then move on. If you reverse areas an EVEN number of times, you'll end up with the original colors. - You can reverse anything from 1 character to the full screen, or any rectangular area in between. - If the final parameter ("#") is "1," we'll reverse the entire area. If it's "0," we'll reverse just the border around the area. To Use it: SS 10 TopRow LeftCol BotRow RightCol Times # Where: - "10" = Option #10 (the Reverse Colors option) - "TopRow LeftCol BotRow RightCol " indicate the rectangular area of the screen you want reversed. The top left corner of your screen would be row 1, column 1. The bottom right corner of 25-line screens would be 25, 80. - "Times" is a number from 1 to (anything) indicating how many times we should reverse colors. Remember, every second time restores the original colors. So use EVEN numbers to end up with original colors. Use ODD numbers to end up with the colors reversed. - "#" is 1 or 0. If it's 1, Sparkle will reverse the entire area you specified. If it's 0, just the border around the area will be reversed. Notes on Paint and Reverse Color SS.18 ================================================================== * Reverse Color literally reverses the foreground and background colors in areas you specify. Please note that some color com- binations look fine in normal mode but NOT when reversed. In fact, text may be unreadable if you reverse certain colors. - IF you want text to be readable whether it's in normal or reversed mode, begin with highly contrasting colors (eg., White on Black or Blue), and AVOID bright foreground colors. - OR, make sure you reverse colors an EVEN number of times so that when we're done, your original colors are restored. * If you enter "illegal" screen coordinates (e.g., a top row greater than the bottom row), one of two things may occur: 1) nothing; or, 2) a strangely painted screen. In other words, nothing tragic should occur. For example, if your screen is in 25 row by 80 column mode, and you tell Sparkle to paint column 10 to column 5343, Sparkle will keep wrapping around the screen until it paints about 5300 characters. * Both Paint and Reverse work fine on 43 or 50 line screens. Of course it's up to you to put your screen in these modes first. * To paint with Bright Background colors, first turn bright back- grounds on (see the next page), then paint something using blinking colors. You get blinking colors by choosing a color from the color chart you'll find later, then adding 128 to the color number. Option 11: BRIGHT BACKGROUNDS SS.19 ================================================================== Syntax: SS 11 # ("#" is 1 = ON, 0 = OFF) Purpose: To display things in colors you normally can't get. To turn bright background colors on -or- off. IMPORTANT: In text mode, PC monitors can normally display 128 colors (by combining 16 foreground with 8 background colors). You can also make these colors blink, giving you 128 more colors. BUT, on color monitors, you can turn blinking colors into striking bright backgrounds. Bright backgrounds are achieved by using BLINKING FOREGROUND colors, and then telling the PC to display blinking as bright backgrounds. This means: - You CAN'T mix blinking foregroundq and bright back- grounds on the same screen: they're exclusive. - You CAN, however, mix bright and normal backgrounds. Bright backgrounds can ONLY be displayed on color- capable monitors. If you print or paint with bright backgrounds on Hercules or monochrome monitors (and older IBM CGA monitors), you'll get BLINKING INSTEAD! In short, you need a CGA, EGA or VGA monitor to success- fully use this option. On some older IBM CGA monitors, you'll get blinking instead of bright backgrounds. If you're unsure what type of monitor will be in use when your batch file runs, you may want to AVOID this option. To Use it: SS 11 # - "11" = Option #11 (the Bright Background option) - "#" = 1 (turn ON) or 0 (turn OFF) bright backgrounds Once you turn bright backgrounds on: * Anything currently on your screens that's blinking will stop blinking and appear with bright backgrounds. * Anything you subsequently print or paint with blinking colors will be displayed with bright backgrounds instead. - To print using bright backgrounds, choose the color you want to print with from the Color Table below. Then add 128 to it to turn it into a blinking color. * If you print or paint using bright backgrounds, then turn bright backgrounds off, at least part of your screen will start blinking. Option 12: GET INPUT SS.20 ================================================================== Syntax: SS 12 Row Column Color Length # /Prompt /Name Purpose: This sophisticated option lets you get input from users (from 1 to 80 characters), then save it to either a file -or- an environment variable. For example, get passwords. Or get users' names, and then "customize" batch file messages by including users' names using DOS' "named parameters" feature. See the section called "Using DOS' Named Parameters" for details. - Setting environment variables may NOT work with DOS versions 1.x or 2.x. Therefore, before using this, you might want to use Sparkle's "Get DOS Version" option to see which version of DOS is being used. There must ALSO be enough ENVIRONMENT SPACE (memory) to save information in environment variables. We'll discuss this issue below. - If you tell Sparkle to set an environment variable, you can use DOS' "named parameters" feature to use this variable later in your batch file. - You can specify a prompt (eg., "Enter your ID #--> "). - You can specify the MAXIMUM number of characters to accept. If "Length" is NEGATIVE, it tells Sparkle the # is also the MINIMUM. In this case, you MUST enter, say, exactly 6 characters. No more, no less. - You can specify where on the screen we'll print the prompt, and what colors to use. Prompts are optional. IMPORTANT: This is the only Sparkle option that might cause errors. As Sparkle exits this option, it sets the DOS Errorlevel to let you know what happened. See "A Note On Testing Errorlevels." If the Errorlevel is 0, no error occurred. If it's greater than 0, an error occurred, possibly due to: - Disk or Drive errors when saving output to a file. - Errors creating an environment variable (105 = too little environment space, 103 = illegal variable name). - You entered illegal screen coordinates (eg., you told us to print the prompt or get input in column 90 on an 80 column monitor). SS.21 To Use it: SS 12 Row Column Color Length # /Prompt /Name - "12" = Option #12 (the Get Input option) - "Row Column" indicate where on the screen we should print the prompt (if any), then pause to get input. - Color is a number from 0 to 255 indicating both the foreground and background color. See "Choosing Color Numbers" for details. We use the same color to print the prompt and while you're typing. - Length is the maximum number of characters to allow. If Length is NEGATIVE, you're telling Sparkle to accept EXACTLY the number of characters you specify -- no more, no less. Be careful here. If you use NEGATIVE length numbers, BE SURE to tell users to enter EXACTLY the # of characters you insist on. - "#" is 1 or 0. "1" tells Sparkle2 to save what's entered to an environment variable. "0" means save what's been entered to a file on disk. In either case the NAME used will be the name you specify in the "/Name" variable. - "/Prompt" is the prompt string you'd like us to display at Row, Column. This is optional. If /Prompt is blank, we'll pause at Row, Column to get input. You MUST include the "/" even if you want no prompt. - "/Name" is the name of a file -or- environment variable we'll use to pass what's been entered back to you. If "/Name" is blank, we'll use "SS". NOTE: If you tell Sparkle to save user input to a file (# = 0), we'll APPEND that input to the file. This means that if you use this option several times, the file would end up with several lines in it -- one for each time you invoked this option. IF you need one-line files, delete the file before running Sparkle. For example: REM ------ We're creating a file called SP_TEMP ------ if not exist SP_TEMP goto Proceed del SP_TEMP :Proceed SS 12 1 10 79 -12 0 /Enter PASSWORD --> /SP_TEMP Using DOS' Named Parameters SS.22 ================================================================== Sparkle's "Get Input" option lets you SET environment variables equal to what the user enters. You can later use DOS' "named parameter" feature to access these variables. Please note that: 1. Early versions of DOS may not allow this. You might consider using Sparkle's "Get DOS version" option before trying this. 2. You MUST have free "environment space" to SET variables. - The amount of environment space needed is equal to the length of the variable NAME, PLUS the length of user input. For example, if you ask for "PASSWORD" (a NAME with 8 characters), and the password can enter 10 characters, you will need about 20 bytes of environment space. - DOS typically doesn't tell you how much environment space is free. But programs like QuarterDeck's Manifest can. - To INCREASE environment space, edit your CONFIG.SYS file. Add a line like (or edit the line that looks like) this: shell=C:\DOS\COMMAND.COM /e:512 "/e:512" reserves 512 bytes of RAM for environment variables. Note that DOS already allocates some environment space to store things like your PATH statement, your PROMPT $..., etc. For example, by default, DOS 6.2 reserves 256 bytes. Using Named Parameters ====================== To use the variables that Sparkle SETs, use DOS' "named parameter" feature. "Named parameters" let you define "variables" you can use later in your batch files. Basically, you: * SET variables to specific values (eg., SET PASSWORD=MyName). Sparkle's Get Input option can do this for you. * Later in your batch files, you refer to (or access) variables by surrounding variable NAMES with "%" as in "%PASSWORD%" DOS replaces "%PASSWORD%" with that variable's "value." For example, suppose you use Sparkle's Get Input option to ask for users' names, telling Sparkle to SET an environment variable called USERNAME. Later in your batch file, you could refer to users by name like this: Echo Thank you %USERNAME% for considering our product. DOS would replace %USERNAME% with the name they entered earlier. Option 13: DOS Version SS.23 ================================================================== Syntax: SS 13 Purpose: Determine which version of DOS is being used. This can be useful to determine if an early versions of DOS is being used -- a version which won't allow you to do things later versions allow (like setting DOS environ- ment variables, as you might when using Sparkle's Get Input option). IMPORTANT: This option takes no parameters. It simply returns a DOS Errorlevel indicating which version of DOS currently being used. The number (errorlevel) will be a 2-digit number indicating the MAJOR and MINOR parts of the DOS version. For example, if you're using DOS 4.1, Sparkle returns an Errorlevel of 41. DOS 5.0 would be returned as 50. To Use it: SS 13 (that's it; no parameters) In your batch files, test the Errorlevel like this: If Errorlevel 60 goto .... ::DOS 6.x or HIGHER If Errorlevel 50 goto .... ::DOS 5.x or HIGHER If Errorlevel 40 goto .... ::DOS 4.x or HIGHER If Errorlevel 30 goto .... ::DOS 3.x or HIGHER Goto WrongDOS ::DOS 2.x of LOWER is ::being used Note we test Errorlevels from HIGH to LOW! This is required by DOS. See "A Note on Testing Errorlevels" for more on this. Option 14: VIEW FILE SS.24 ================================================================== Syntax: SS 14 TopRow LeftCol BotRow RightCol Color /Name Purpose: Display ASCII text files in any color in a "window" on your screen. The "window" can be any size -- from the full screen, to just part of it. Run Demo.Bat to see an example of displaying files in a partial window. To Use it: SS 14 TopRow LeftCol BotRow RightCol Color /Name - "14" = Option #14 (View File) - "TopRow LeftCol BotRow RightCol" indicate where on your screen we should display the file. The top left corner of your screen would be row 1, column 1. The bottom right corner of 25-line screens would be 25, 80. - "Color" is a number from 1 to 128 indicating what color we should use to display text. While this could be greater than 128 for blinking colors, it might be unkind to expect folks to read screens full of blinking text. - "/Name" is the name of the file to display. BE SURE to include the drive/directory if your file is NOT on the current path. Notes: * YOU must verify your file exists before using this option. You'd do that in batch files like this: If not exist FileName.Ext goto ErrorSection SS 14 30 25 75 27 /FileName.Ext * It's also up to YOU to tell users what to do once we display the file. Normally, you'd display an "in- struction screen", then ask Sparkle to display your file inside some window of that instruction screen. - Cursor pad keys (Home/End, Left/Right/Up/Down, PgDn/PgUp) work as they do in most word processors. - Press ESCAPE to exit View File and move on. * Only 3 errors are likely to occur. And Sparkle sets the DOS Errorlevel to let you know what happened: 0 = No error 1 = File not found 2 = Too little memory (about 5k is required) 3 = A Row, Column or Color number was LESS than 1 Option 15: DYNAMIC PROMPTS SS.25 ================================================================== Syntax: SS 15 Row Column Color # ("#" = 1, 2 or 3) /Text Purpose: Display a dynamic prompt, wait for a keypress, set the DOS Errorlevel based on the key the user presses. To Use it: SS 15 Row Column Color # - "15" = Option #5 (Prompt) - "Row Column" mean the row and column on the screen where we should display the prompt. - "Color" is a number from 1 to 128 indicating what color we should use to display text. While this could be greater than 128 for blinking colors, these prompts are already dynamic. But feel free to try blinking colors. You could also turn on bright backgrounds, then use blinking colors. - "#" indicates which prompt you'd like to use. 1 = A Twirling Baton 2 = An Exploding Button 3 = A Scrolling "Press any key to continue..." - "/Text" is optional. If included AND you specify prompt #3, Sparkle scrolls YOUR text across the screen -- instead of "Press any key to continue..." Notes: * If you specify prompt #3 and do NOT include "/Text," Sparkle will scroll "Press any key to continue..." But, if you specify #3 AND you include "/Text," Sparkle will scroll YOUR message across the screen. * "Press any key . . ." is about 35 characters wide. To CENTER it on the screen, specify COLUMN = 23. If you specify a COLUMN greater than 45, PART of the banner will wrap around to the next line! * When the user presses a key to go on, Sparkle sets the DOS Errorlevel to tell you which key was pressed. See "A Note on Testing Errorlevels" below. Option 16: DARK BLUE BACKGROUND COLORS SS.26 ================================================================== Syntax: SS 16 # ("#" is 1 (Dark blue ON) or 0 (off)) Purpose: Turn ON (or off) dark blue background colors. To Use it: SS 16 # - "16" = Option #16 (Dark Blue Backgrounds) - "#" is "1" (turn it ON) or "0" (off) Notes: This option requires a VGA monitor -- nothing will happen on non-VGA monitors. You can SAFELY include this option in all batch files. If Sparkle detects a non-VGA monitor, it ignores this command -- your PC won't crash. Many people find it easier to read text printed in highly contrasting colors. For example, white on black, or black on red are often easy to read, while light cyan on green may not be very readable. But black backgrounds can get tedious. That's why many people switch to blue backgrounds. But that also might get a little old after awhile. Sparkle's Dark Blue background gives you an alternative to black and normal blue backgrounds. And since the background is fairly dark, most colored text is quite readable. Option 17: BIG! SCROLLING MESSAGES SS.27 ================================================================== Syntax: SS 17 Color CharacterCode Font #Times / Message / Purpose: Display a TALL message which SCROLLS across the screen. NOTE: Scrolling can be "jittery" on slow or very fast PCs -- because we have to move so much stuff around the screen To Use it: SS 17 Color CharacterCode Font #Times / Message / - "17" = Option #17 (BIGScroll) - "Color" is a number from 1 to 128 indicating what color we should use to display text. While this could be greater than 128 to make text blink, scrolling text is already dynamic. But feel free to try blinking colors. You could also turn on bright backgrounds, then use blinking colors. - "CharacterCode" is a number from 1 - 254 indicating which ASCII character we should use to "build" each tall character with. If 0, Sparkle defaults to ASCII character 178. - "Font" is the number "1" or "0". -- "0" selects the normal screen font (the same one used in Sparkle's Big! Font) in which characters are 7 - 8 lines tall. -- "2" selects the a custom Broadway font in in which characters are 13 - 14 lines tall. This is the "attention-getting" option. - "#Times" indicates how many times we should scroll the message across the screen. "0" means scroll CONTINUOUSLY -- we won't stop until you press a key. This is useful to display messages like "Out to lunch! Be back at 1:30!" -or- "The backup is done!" If a key is pressed at any time, we'll stop scrol- ling -- but we WON'T clear the screen. Since you would normally continue in your batch file, you can clear the screen (CLS) before proceeding. - "/ Message /" is the text you want displayed. NOTE: "message" can contain almost ANY ASCII char- acters. And we URGE YOU to LENGTHEN messages with blanks so they scroll completely off the screen. Do this by adding 8 - 10 SPACES to the end of messages, followed by "/" (or your "text marker") -- like this: SS 17 27 219 1 1 / Clear with spaces / Option 18: FADES (screen transitions) SS.28 ================================================================== Syntax: SS 18 # (1 - 9) Color Slow_it_down (1 - 20) Purpose: Clear the screen in dramatic ways, in any color. To Use it: SS 18 # (1 - 9) Color Slow_it_down (1 - 20) - "18" = Option #18 (Fades) - "#" = is a number from 1 - 9 indicating which screen transition you want to use: 1 = Close In (top/bottom) 2 = Open Out (top/bottom) 3 = Slide Up 4 = Slide Down 5 = Explode out 6 = Vertical Blinds 7 = Columns Up & Down 8 = "Old TV" Shutdown 9 = Wild Spiral - "Color" is a number from 1 to 128 indicating what color we should use to clear the screen. All op- tions EXCEPT #9 use this color to clear the screen. #9 (Wild Spiral) uses colors already on the screen. - "Slow_it_down" is a number from 1 - 20 which lets you control how fast screen fades occur -- the higher the number, the slower it will occur. #9 (Wild Spiral) does NOT use this -- since too much is happening already. Notes: We've made each option as fast as possible -- to give YOU maximum flexibility, and to let YOU fine- tune these screen effects based on your PC's speed. But, depending on what colors and text are on the screen, some fades may be TOO FAST. No problem, just use a "slowdown" number of, say, 3 - 5. A slowdown number of 15 - 20 is v-e-r-y slow. Also note that option 9 (Wild Spiral) grabs whatever exists in column 1 of row 25 and starts spinning that around the screen. So you might want to control what appears in row 25, column 1 BEFORE you use Wild Spiral. And Wild Spiral does NOT scroll row 25. Option 19: Sparkle's BROADWAY SCREEN FONT SS.29 ================================================================== Syntax: SS 19 # (1 = load Broadway Font, 0 = use Normal Font) Purpose: On VGA screens (only) install a tall, Broadway screen font. This will appear on text-mode screens only, and ONLY with text printed in LOW intensity colors. Text in HIGH intensity colors will appear in the normal screen font -- letting you get two text-mode fonts on the screen at the same time! Run Demo.Bat and select the "Menus" option to see an example -- on VGAs. To Use it: SS SS 19 # (1 = Broadway Font ON, 0 = Normal Font) - "19" = Option #19 (Broadway font) - "#" = is 1 (load the Broadway font), or 0 (Normal) Notes: Sparkle's Broadway font comes from our FONT PAK utility. Font Pak (available in both DOS and PROGRAMMERS' ver- sions) offers about 100 screen fonts, and many utilities. Many people aren't aware that on EGA or VGA monitors one can "download" 1 - 8 different fonts, then switch among them quickly and easily. You can also display 2 fonts at once on the same screen -- in TEXT mode! Note that this Broadway font is v-e-r-y TALL -- too tall for EGA screens. And because it's so tall, it is NOT well suited for displaying consecutive lines of text all in the same Broadway font. RATHER, it's better suited for titles, menus or highlighting words or phrases -- with lines immediately above/below it either blank, or appearing in the normal font. Once you load the Broadway font, YOU determine what text appears in the Broadway font, and what appears in the normal font. You do this by controlling the INTENSITY of the color(s) you use to display text. * Any text appearing in LOW intensity colors will appear in the Broadway font. Text in HIGH intensity colors appears in the normal font. * Several Sparkle options let you print things in colors you prefer (or change the colors of text): Windows, Quick_Print, Paint and Reverse Colors. NOTE: For an interesting effect, load the Broadway font, display some text, then alternately PAINT that text with Low, then High intensity colors -- pausing briefly in between. As you paint it, the text will switch from the Broadway to the normal font. APPENDIX I: A Note on Testing Errorlevels A.1 ================================================================== Also see APPENDIX III: ASCII Codes for many keyboard characters. Always test Errorlevels from the HIGHEST number to the LOWEST. This is a DOS restriction. For example: If Errorlevel 2 goto no \ this sequence If Errorlevel 1 goto yes / is correct If Errorlevel 1 goto yes \ this sequence If Errorlevel 2 goto no / is WRONG Here's why this is important. DOS tests the phrase: If Errorlevel 1 goto yes as if it read "If Errorlevel greater-than-or-equal-to-1 goto Yes." So, if you start testing with "If Errorlevel 1 goto Yes" (note "1"), DOS will almost ALWAYS go to "Yes" -- since most everything is "greater-than-or-equal-to 1". Examples: ========= For example, here's how you might test errorlevels after getting a choice from a scrolling bar menu. Note that we first test for Escape (Ascii code 27). Bar menus return the NUMBER of the option chosen. Suppose this menu had 5 choices. We first test for Escape, since 27 is higher than 5. We then test for which option was chosen with "If Errorlevel 5 ...." :_MainMenu SS 2 5 5 5 76 112 2 If Errorlevel 27 goto _End If Errorlevel 5 goto _End If Errorlevel 4 goto _BarMenus If Errorlevel 3 goto _Sounds If Errorlevel 2 goto _Windows If Errorlevel 1 goto _Intro goto _MainMenu (just in case tests fail) Here's what a batch file might look like if you used ASK. * NOTE: Here we test for Escape LAST!! That's because ASK returns the ASCII value of the UPPER CASE key pressed. The ASCII code for "Y" is 89, the code for "N" is 78. The code for Escape (27) is LESS THAN 89 or 78, so we test for it last. :_AskAgain SS 3 25 20 112 /YN /Do you want to go on? Press [Y]es or [N]o If Errorlevel 89 goto _YesPressed If Errorlevel 78 goto _NoPressed If Errorlevel 27 goto _AskAgain '--- We'll ONLY accept Y or N! goto _AskAgain '--- Ditto for any other key. APPENDIX II: Choosing COLOR NUMBERS A.2 ================================================================== Several Sparkle options ask for a COLOR NUMBER: ONE number indi- cating BOTH Foreground AND Background colors. Here's how to determine it. (Tip: Print this page as a quick reference guide.) Step 1: In the table below, move your finger DOWN the left column until it's on the FOREGROUND color you want. Notice that the first 8 colors are "normal" (low) intensity, the next 8 are "bright" ("high intensity") versions of the first 8. Step 2: Now move your finger ACROSS the columns until it's under the BACKGROUND color you want. Use the number you see there (under your finger). NOTE that, as you move across the columns, numbers increase by 16. If you prefer for- mulas to tables: Color = ForeGround + (Background * 16). Foreground colors range from 0 - 15; Background from 0 - 7. Step 3: OPTIONAL: For blinking -OR- bright background colors, add 128 to the number you got in step 2. If you want bright background colors, BE SURE to first use Sparkle's option to turn Bright_BG colors ON. BACKGROUND COLORS ================= Black Blue Green Cyan Red Magnta Brown White ---0-----1-----2-----3-----4-----5-----6-----7---- F Black 0 16 32 48 64 80 96 112 O Blue 1 17 33 49 65 81 97 113 N R Green 2 18 34 50 66 82 98 114 O E Cyan 3 19 35 51 67 83 99 115 R G Red 4 20 36 52 68 84 100 116 M R Magenta 5 21 37 53 69 85 101 117 A O Brown 6 22 38 54 70 86 102 118 L U White 7 23 39 55 71 87 103 119 N D Grey 8 24 40 56 72 88 104 120 Blue 9 25 41 57 73 89 105 121 B C Green 10 26 42 58 74 90 106 122 R O Cyan 11 27 43 59 75 91 107 123 I L Red 12 28 44 60 76 92 108 124 G O Magenta 13 29 45 61 77 93 109 125 H R Yellow 14 30 46 62 78 94 110 126 T S White 15 31 47 63 79 95 111 127 For Example: ============ Any color on black background: 1 - 15 Black foreground on white background: 112 (visible on any monitor) Bright white on a blue background: 31 Black on a red background: 64 Blinking black on a cyan background: 176 (48 + 128 = 176) APPENDIX III: ASCII Codes for many keyboard characters A.3 ================================================================== Use the chart below to help add "If Errorlevel # ...." statements to your batch files. When you use several of Sparkle's options (like Ask and Prompt), Sparkle sets the DOS Errorlevel to let you know which key users pressed. The chart below lists the ASCII values for most key- board characters. Note: * We list ASCII values of just UPPER CASE letters. Lower case letters have values 32 higher than those shown. * Remember to test errorlevels from HIGH to LOW. Appendix I, "A Note on Testing Errorlevels," explains why. ASCII ASCII Key Pressed Code Key Pressed Code =========== ===== =========== ===== A 65 B 66 C 67 D 68 E 69 F 70 G 71 H 72 I 73 J 74 K 75 L 76 M 77 N 78 O 79 P 80 Q 81 R 82 S 83 T 84 U 85 V 86 W 87 X 88 Y 89 Z 90 0 48 1 49 2 50 3 51 4 52 5 53 6 54 7 55 8 56 9 57 =============================================================== To Register or Order =============================================================== Because we offer so many programs, our order form has 2 pages. * THIS PAGE lists our programs and the per-copy cost of each. Please read CATALOG.Txt for a description of each program. * THE NEXT PAGE is the actual order form. - On the next page, fill in the name of each program you're ordering. PLEASE BE CAREFUL here and use the names listed below. If we're not sure which program you're ordering, we may have to return you're order. - If ordering by Visa or MasterCard, fill in the section for credit card orders. BE SURE TO SIGN it. Program Name Per Copy ============================================================== Multi-Print $19 if ordered w/ ANY other program $19/$29 Font Pak "Pro" Programmer's Fonts & Mouse Shapes $49 Font Pak "DOS" Hundreds of DOS text-mode fonts $29 PDT The Pro~Formance Data Tool $139 PDT Tool Kit (FREE when you order PDT!) $39 inform-Z Professional Forms Design $29 Mail Call With MC Express $29 Pro~Scribe & PS Express $29 P~F Presents Professional Version $79 P-Screen Professional $49 " Plus $29 Pro~Stamp Stamp Collection Manager $29 Ram-Man RAM-resident Text File Browser $19 Sparkle AND Menu Magic $29 The Survey Catalyst $395 ================================================================= PACKAGE DISCOUNTS Call about quantity discounts & site licenses. ================================================================= THE WORKS! One of each program (except The Catalyst) $299 Sparkle -AND- P-Screen $49 inform-Z -AND- Mail Call $49 P-Screen Pro -AND- P~F Presents (Pro versions of both) $99 ============================= TO ORDER ============================= For FASTEST delivery of your programs, CALL with a Visa/MC card number. F __________________________________________ M Rob W. Smetana Pro~Formance R __________________________________________ A T 132 Alpine Terrace San Francisco, CA O __________________________________________ I O 94117 (415) 863-0530 M __________________________________________ L Make checks payable Phone ( ) ______-________ Date ___/___/___ to: Rob W. Smetana ======================================================================= For Visa or MasterCard Orders ======================================================================= Credit Card Number: ________________________________ Expires: ___|___ Signature (Required for credit card orders): __________________________ Be sure your name at the top matches how it appears on your credit card. ============================================================= spk 4.2 = Name of Program or "Package" # of Copies Price/Copy Total ======================================================================= Multi-Print ($19 if ordered /w other pgm) _____ x $19/$29 = $_______ _____________________________________ ________ x ______ = $_______ _____________________________________ ________ x ______ = $_______ ======================================================================= Shipping & Handling: Total Number of Programs (and Copies) ----->> _____@ $4/copy $ ______ =============================+========================================= | Subtotal $ ________ INTERNATIONAL ORDERS: : : | | CA. residents, add 8.5% tax $ _______ * US funds only please. +-----------------------+----------------- * Money order, check drawn a | US bank, or VISA/MasterCard |TOTAL $ ________ =====================================================+================= WHERE did you got your copy of our program? _________________________ This helps us learn the best way to get new programs to you. And feel free to write comments and suggestions on the other side. Thank you.